package com.niiwoo.civet.account.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 红包类型子账单类型
 * @Author zq
 * @Date 2017/12/11
 */
@Getter
@AllArgsConstructor
public enum AccountPrizeExtendTypeEnum {


    // extendType 最大值不能大于127
    DEFAULT((byte) 0, "默认值", "默认值:不记账单类型", "", ""),
    PLATFORM_RECOMMEND_INVESTOR((byte) 1, "推荐投资奖励", "用户邀请投资人完成投资相关奖励【运营活动】", "4212021", "1120005"),
    PLATFORM_RECOMMEND_INVESTED_BONUS((byte) 2, "推荐投资奖励", "用户邀请其他人完成投资每日可获得分红金【运营活动】", "4212023", "1120007"),
    PLATFORM_RECOMMEND_LOAN_BONUS((byte) 3, "推荐借款奖励", "用户邀请其他人完成借款可获得分红金【运营活动】", "4212003", "1120009"),
    PLATFORM_RECOMMEND_GUARANTOR_COMPLETE_BONUS((byte) 4, "推荐担保人奖励", "用户邀请其他人完成担保人资格（钱小保、钱大保、个人微担保）奖励【运营活动】", "4212009", "1120015"),
    PLATFORM_RECOMMEND_GUARANTEE_COMPLETE_FIRST((byte) 5, "推荐担保奖励", "用户邀请其他人完成首次担保相关奖励【运营活动】", "4212031", "1120013"),
    PLATFORM_RECOMMEND_INVEST_COMPLETE((byte) 6, "被推荐人投资奖励", "完成首次投资【运营活动】", "4212043", "1120023"),
    PLATFORM_GIVEN_GUARANTEED_FIRST((byte) 7, "被推荐人担保奖励", "首次担保奖励【运营活动】", "1120027", "1120027"),
    PLATFORM_RECOMMEND_BORROW_COMPLETE_FIRST((byte) 8, "被推荐人借款奖励", "完成首次借款【运营活动】", "4212041", "120019");



    private Byte extendType;
    private String title;
    private String description;
    private String plateformBillCode;// 平台对应账单
    private String userBillCode; // 用户对应账单

    public static AccountPrizeExtendTypeEnum getExtendTypeEnum(Byte extendType) {
        for (AccountPrizeExtendTypeEnum type : values()) {
            if (type.getExtendType().equals(extendType)) {
                return type;
            }
        }
        return null;
    }
}
